<?php
/**
 * @version     $Id: default.php 3 2010-10-08 17:49:35Z obalyuk87@gmail.com $
 * @package     AdminSafe
 * @subpackage  Components
 * @author      Oleksandr Balyuk <obalyuk@boolcast.com>
 * @copyright   Copyright (C) 2010 Oleksandr Balyuk (www.boolcast.com)
 * @license     http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL v2
 */
// No direct access
defined('_JEXEC') or die('Restricted access');
?>

<form action="<?php echo JRoute::_('index.php?option=com_adminsafe'); ?>" method="post" name="adminForm">
    <input type="hidden" name="controller" value="invalidkeylog" />
    <input type="hidden" name="task" value="" />
    <input type="hidden" name="boxchecked" value="0" />
    <input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
    <input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
    <input type="hidden" id="ajaxUrl" value="<?php echo $this->ajaxUrl; ?>" />
    <input type="hidden" id="clickToBanText" value="<?php echo JText::_('Click to BAN IP'); ?>" />
    <input type="hidden" id="clickToUnBanText" value="<?php echo JText::_('Click to UNBAN IP'); ?>" />
    <input type="hidden" id="banImg" value="<?php echo JURI::root(true) . "/$this->banImg"; ?>" />
    <input type="hidden" id="unbanImg" value="<?php echo JURI::root(true) . "/$this->unbanImg"; ?>" />
    <input type="hidden" id="warningImg" value="<?php echo JURI::root(true) . "/$this->warningImg"; ?>" />
    <input type="hidden" id="errorImg" value="<?php echo JURI::root(true) . "/$this->errorImg"; ?>" />
    <?php echo JHTML::_('form.token'); ?>

    <div id="tablecell">
        <table class="adminlist">
            <thead>
                <tr>
                    <th width="5"><?php echo JText::_('NUM'); ?></th>
                    <th width="20">
                        <input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($this->log); ?>);" />
                    </th>
                    <th><?php echo JHTML::_('grid.sort', JText::_('Access Time'), 'date_time', $this->lists['order_Dir'], $this->lists['order']); ?></th>
                    <th><?php echo JHTML::_('grid.sort', JText::_('IP Address'), 'ip_address', $this->lists['order_Dir'], $this->lists['order']); ?></th>
                    <th><?php echo JHTML::_('grid.sort', JText::_('Browser'), 'browser', $this->lists['order_Dir'], $this->lists['order']); ?></th>
                    <th><?php echo JHTML::_('grid.sort', JText::_('Operating System'), 'os', $this->lists['order_Dir'], $this->lists['order']); ?></th>
                    <th><?php echo JText::_('Affected Users'); ?></th>
                    <th width="1%" nowrap="nowrap">
                        <?php echo JHTML::_('grid.sort', 'ID', 'id', @$this->lists['order_Dir'], @$this->lists['order']); ?>
                    </th>
                </tr>
            </thead>
            <tfoot>
                <tr>
                    <td colspan="8">
                        <?php echo $this->pagination->getListFooter(); ?>
                    </td>
                </tr>
            </tfoot>
            <tbody>
                <?php foreach ($this->log as $item) {
                ?>
                            <tr class="row<?php echo $this->zeroOne++ % 2; ?>">
                                <td><?php echo $this->pagination->getRowOffset($this->pidx++); ?></td>
                                <td><?php echo $item->check; ?></td>
                                <td><?php echo $item->date_time; ?></td>
                                <td><?php echo $item->ip_address; ?></td>
                                <td><?php echo $item->browser; ?></td>
                                <td><?php echo $item->os; ?></td>
                                <td><?php echo $item->userLink; ?></td>
                                <td><?php echo $item->id; ?></td>
                            </tr>
                <?php } ?>
                    </tbody>
                </table>
            </div>
        </form>

<?php
                        echo $this->loadTemplate('legend');
?>